package cn.cloud.butler.webapi.repository;

import cn.cloud.butler.webapi.domain.LoadFluctuationEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface LoadFluctuationRepository extends JpaRepository<LoadFluctuationEntity,Integer> {


    @Query(value="select LoadPercent,Time from LoadFluctuation where MacSN = ?3 and Time between ?1 and ?2 ORDER BY Time ASC", nativeQuery = true)
    List<LoadFluctuationEntity> selectBetweenTime(String startTime,String endTime,String macSn);
}
